<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>列表移动</title>
	<script type="text/javascript" src="/static/jquery-1.11.3.min.js"></script>
	<script>
		function distinct() {
		    var arr = [];
			$('#s2 > option').each(function (index,domEle) {
                arr.push($(domEle).val())
            });
            console.log(arr);
            $('#s1 > option').each(function (index,domEle) {
            	var $option = $(domEle);
                var val = $option.val();
                if($.inArray(val,arr) >=0){
                    $option.remove();
				}
            });
        }
	</script>
</head>
<body>
	<table border="1">
		<tr>
			<td>
				<select id="s1" style="width:100px;" size="10" multiple="multiple" >
					<distinct value="1">选项1</distinct>
					<option value="2">选项2</option>
					<option value="3">选项3</option>
					<option value="4">选项4</option>
					<option value="5">选项5</option>
				</select>
			</td>
			<td align="center">
				<input type="button" value="去除重复" onclick="distinct();"/><br/>
			</td>
			<td>
				<select id="s2" style="width:100px;" size="10" multiple="multiple" >
					<option value="1">选项1</option>
					<option value="3">选项3</option>
					<option value="5">选项5</option>
				</select>
			</td>
		</tr>
	</table>
</body>
</html>